
const state = {
	orderType: "1",
	orderTypeIndex: 0,
	// 是否首页开启缓存
	indexCache: false
}

const mutations = {
	SET_ORDER_TYPE(state, data){
		state.orderType = data;
	},
	SET_ORDER_TYPE_INDEX(state, data){
		state.orderTypeIndex = data;
	},
	SET_INDEX_CACHE(state, value){
		state.indexCache = value
	}
}
 
const actions = {
	setOrderType({ commit }, data){
		commit("SET_ORDER_TYPE", data)
	},
	setOrderTypeIndex({ commit }, data){
		commit('SET_ORDER_TYPE_INDEX', data)
	}
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}